/*
 * Powered By [rapid-framework]
 * Web Site: http://www.rapid-framework.org.cn
 * Google Code: http://code.google.com/p/rapid-framework/
 * Since 2008 - 2019
 */

package net.dreamlu.db.qo;

import java.io.Serializable;
import java.util.ArrayList;
import java.util.List;
import java.util.Date;
import javax.persistence.criteria.CriteriaBuilder;
import javax.persistence.criteria.Predicate;
import javax.persistence.criteria.Root;
import javax.persistence.criteria.Expression;
import javax.persistence.criteria.Order;

import org.apache.commons.lang.builder.ToStringBuilder;
import org.apache.commons.lang.builder.ToStringStyle;
import org.hibernate.criterion.MatchMode;
import org.springframework.data.jpa.domain.Specification;
import net.dreamlu.db.po.*;
/**
 *
 * @author lambert.wang email:lambert.wang(a)crediteyes.com
 * @version 1.0
 * @since 1.0
 */
public class PayQuery extends Pay implements Serializable {
    private static final long serialVersionUID = 3148176768559230877L;
    

	/** 主键 */
	private java.lang.Integer id;	
	private java.lang.Integer notEqId;	
	/** nickName */
	private String likeNickNameWithStart;
	private String likeNickNameWithEnd;
	private String likeNickNameWithExact;
	private String likeNickNameWithAnywhere;
	private java.lang.String nickName;	
	private java.lang.String notEqNickName;	
	/** info */
	private String likeInfoWithStart;
	private String likeInfoWithEnd;
	private String likeInfoWithExact;
	private String likeInfoWithAnywhere;
	private java.lang.String info;	
	private java.lang.String notEqInfo;	
	/** money */
	private Long money;	
	private Long notEqMoney;	
	/** email */
	private String likeEmailWithStart;
	private String likeEmailWithEnd;
	private String likeEmailWithExact;
	private String likeEmailWithAnywhere;
	private java.lang.String email;	
	private java.lang.String notEqEmail;	
	/** 显示状态 0待审核 1确认显示 2驳回 3通过不展示 */
	private java.lang.Integer state;	
	private java.lang.Integer notEqState;	
	/** payType */
	private String likePayTypeWithStart;
	private String likePayTypeWithEnd;
	private String likePayTypeWithExact;
	private String likePayTypeWithAnywhere;
	private java.lang.String payType;	
	private java.lang.String notEqPayType;	
	/** createTime */
	private java.time.LocalDateTime createTimeBegin;
	private java.time.LocalDateTime createTimeEnd;	
	private java.time.LocalDateTime createTime;	
	private java.time.LocalDateTime notEqCreateTime;	
	/** updateTime */
	private java.time.LocalDateTime updateTimeBegin;
	private java.time.LocalDateTime updateTimeEnd;	
	private java.time.LocalDateTime updateTime;	
	private java.time.LocalDateTime notEqUpdateTime;	
	/** 假管理邮箱 */
	private String likeTestEmailWithStart;
	private String likeTestEmailWithEnd;
	private String likeTestEmailWithExact;
	private String likeTestEmailWithAnywhere;
	private java.lang.String testEmail;	
	private java.lang.String notEqTestEmail;	
	/** username */
	private String likeUsernameWithStart;
	private String likeUsernameWithEnd;
	private String likeUsernameWithExact;
	private String likeUsernameWithAnywhere;
	private java.lang.String username;	
	private java.lang.String notEqUsername;	
	
	/*********** 系统属性，自动赋值 *********/
	private boolean isId;
	private boolean isNotEqId;
	private MatchMode likenickName;
	private boolean isNickName;
	private boolean isNotEqNickName;
	private MatchMode likeinfo;
	private boolean isInfo;
	private boolean isNotEqInfo;
	private boolean isMoney;
	private boolean isNotEqMoney;
	private MatchMode likeemail;
	private boolean isEmail;
	private boolean isNotEqEmail;
	private boolean isState;
	private boolean isNotEqState;
	private MatchMode likepayType;
	private boolean isPayType;
	private boolean isNotEqPayType;
	private boolean isCreateTimeBegin;
	private boolean isCreateTimeEnd;
	private boolean isCreateTime;
	private boolean isNotEqCreateTime;
	private boolean isUpdateTimeBegin;
	private boolean isUpdateTimeEnd;
	private boolean isUpdateTime;
	private boolean isNotEqUpdateTime;
	private MatchMode liketestEmail;
	private boolean isTestEmail;
	private boolean isNotEqTestEmail;
	private MatchMode likeusername;
	private boolean isUsername;
	private boolean isNotEqUsername;
	private java.lang.Integer ltCriterionId;
	public void setLtId(java.lang.Integer id){
		ltCriterionId = id;
	}
	public java.lang.Integer getLtId(){
		return ltCriterionId;
	}
	private java.lang.Integer leCriterionId;
	public void setLeId(java.lang.Integer id){
		leCriterionId = id;
	}
	public java.lang.Integer getLeId(){
		return leCriterionId;
	}
	private java.lang.Integer gtCriterionId;
	public void setGtId(java.lang.Integer id){
		gtCriterionId = id;
	}
	public java.lang.Integer getGtId(){
		return gtCriterionId;
	}
	private java.lang.Integer geCriterionId;
	public void setGeId(java.lang.Integer id){
		geCriterionId = id;
	}
	public java.lang.Integer getGeId(){
		return geCriterionId;
	}
	public java.lang.Integer getId() {
		return this.id;
	}
	
	public void setId(java.lang.Integer value) {		
		this.id = value;
		this.isId = true;
	}
	public boolean hasId() {
		return this.isId;
	}
	public java.lang.Integer getNotEqId() {
		return this.notEqId;
	}
	public void setNotEqId(java.lang.Integer id) {
		this.notEqId = id;
		this.isNotEqId = true;
	}
	public boolean hasNotEqId() {
		return this.isNotEqId;
	}
	// IN or notIN
	private List<java.lang.Integer>	inCriterionId;
	private List<java.lang.Integer>	notInCriterionId;
	public void setInId(boolean isIn,List<java.lang.Integer> ids){
		if(isIn){
			inCriterionId = ids;
		}else{
			notInCriterionId = ids;
		}
	}
	public List<java.lang.Integer> getInId() {
		return inCriterionId;
	}
	public List<java.lang.Integer> getNotInId() {
		return notInCriterionId;
	}
	
	//Null or NotNull
	private Boolean nullCriterionId;
	public void setNullId(boolean isNull){
			nullCriterionId = isNull;
	}
	public Boolean getNullId(){
		return nullCriterionId;
	} 
	
	public MatchMode getLikeNickName() {
		return this.likenickName;
	}
	public String getLikeNickNameWithStart() {
		return this.likeNickNameWithStart;
	}
	public void setLikeNickNameWithStart(String nickName) {	
		setNickName(nickName);
		setLikeNickName(MatchMode.START);
	}
	public String getLikeNickNameWithEnd() {
		return this.likeNickNameWithEnd;
	}
	public void setLikeNickNameWithEnd(String nickName) {	
		setNickName(nickName);
		setLikeNickName(MatchMode.END);
	}
	public String getLikeNickNameWithExact() {
		return this.likeNickNameWithExact;
	}
	public void setLikeNickNameWithExact(String nickName) {	
		setNickName(nickName);
		setLikeNickName(MatchMode.EXACT);
	}
	public String getLikeNickNameWithAnywhere() {
		return this.likeNickNameWithAnywhere;
	}
	public void setLikeNickNameWithAnywhere(String nickName) {	
		setNickName(nickName);
		setLikeNickName(MatchMode.ANYWHERE);
	}
	private void setLikeNickName(MatchMode matchMode) {		
		this.likenickName = matchMode;
	}
	public java.lang.String getNickName() {
		return this.nickName;
	}
	
	public void setNickName(java.lang.String value) {		
		this.nickName = value;
		this.isNickName = true;
	}
	public boolean hasNickName() {
		return this.isNickName;
	}
	public java.lang.String getNotEqNickName() {
		return this.notEqNickName;
	}
	public void setNotEqNickName(java.lang.String nickName) {
		this.notEqNickName = nickName;
		this.isNotEqNickName = true;
	}
	public boolean hasNotEqNickName() {
		return this.isNotEqNickName;
	}
	// IN or notIN
	private List<java.lang.String>	inCriterionNickName;
	private List<java.lang.String>	notInCriterionNickName;
	public void setInNickName(boolean isIn,List<java.lang.String> nickNames){
		if(isIn){
			inCriterionNickName = nickNames;
		}else{
			notInCriterionNickName = nickNames;
		}
	}
	public List<java.lang.String> getInNickName() {
		return inCriterionNickName;
	}
	public List<java.lang.String> getNotInNickName() {
		return notInCriterionNickName;
	}
	
	//Null or NotNull
	private Boolean nullCriterionNickName;
	public void setNullNickName(boolean isNull){
			nullCriterionNickName = isNull;
	}
	public Boolean getNullNickName(){
		return nullCriterionNickName;
	} 
	
	public MatchMode getLikeInfo() {
		return this.likeinfo;
	}
	public String getLikeInfoWithStart() {
		return this.likeInfoWithStart;
	}
	public void setLikeInfoWithStart(String info) {	
		setInfo(info);
		setLikeInfo(MatchMode.START);
	}
	public String getLikeInfoWithEnd() {
		return this.likeInfoWithEnd;
	}
	public void setLikeInfoWithEnd(String info) {	
		setInfo(info);
		setLikeInfo(MatchMode.END);
	}
	public String getLikeInfoWithExact() {
		return this.likeInfoWithExact;
	}
	public void setLikeInfoWithExact(String info) {	
		setInfo(info);
		setLikeInfo(MatchMode.EXACT);
	}
	public String getLikeInfoWithAnywhere() {
		return this.likeInfoWithAnywhere;
	}
	public void setLikeInfoWithAnywhere(String info) {	
		setInfo(info);
		setLikeInfo(MatchMode.ANYWHERE);
	}
	private void setLikeInfo(MatchMode matchMode) {		
		this.likeinfo = matchMode;
	}
	public java.lang.String getInfo() {
		return this.info;
	}
	
	public void setInfo(java.lang.String value) {		
		this.info = value;
		this.isInfo = true;
	}
	public boolean hasInfo() {
		return this.isInfo;
	}
	public java.lang.String getNotEqInfo() {
		return this.notEqInfo;
	}
	public void setNotEqInfo(java.lang.String info) {
		this.notEqInfo = info;
		this.isNotEqInfo = true;
	}
	public boolean hasNotEqInfo() {
		return this.isNotEqInfo;
	}
	// IN or notIN
	private List<java.lang.String>	inCriterionInfo;
	private List<java.lang.String>	notInCriterionInfo;
	public void setInInfo(boolean isIn,List<java.lang.String> infos){
		if(isIn){
			inCriterionInfo = infos;
		}else{
			notInCriterionInfo = infos;
		}
	}
	public List<java.lang.String> getInInfo() {
		return inCriterionInfo;
	}
	public List<java.lang.String> getNotInInfo() {
		return notInCriterionInfo;
	}
	
	//Null or NotNull
	private Boolean nullCriterionInfo;
	public void setNullInfo(boolean isNull){
			nullCriterionInfo = isNull;
	}
	public Boolean getNullInfo(){
		return nullCriterionInfo;
	} 
	
	public Long getMoney() {
		return this.money;
	}
	
	public void setMoney(Long value) {		
		this.money = value;
		this.isMoney = true;
	}
	public boolean hasMoney() {
		return this.isMoney;
	}
	public Long getNotEqMoney() {
		return this.notEqMoney;
	}
	public void setNotEqMoney(Long money) {
		this.notEqMoney = money;
		this.isNotEqMoney = true;
	}
	public boolean hasNotEqMoney() {
		return this.isNotEqMoney;
	}
	// IN or notIN
	private List<Long>	inCriterionMoney;
	private List<Long>	notInCriterionMoney;
	public void setInMoney(boolean isIn,List<Long> moneys){
		if(isIn){
			inCriterionMoney = moneys;
		}else{
			notInCriterionMoney = moneys;
		}
	}
	public List<Long> getInMoney() {
		return inCriterionMoney;
	}
	public List<Long> getNotInMoney() {
		return notInCriterionMoney;
	}
	
	//Null or NotNull
	private Boolean nullCriterionMoney;
	public void setNullMoney(boolean isNull){
			nullCriterionMoney = isNull;
	}
	public Boolean getNullMoney(){
		return nullCriterionMoney;
	} 
	
	public MatchMode getLikeEmail() {
		return this.likeemail;
	}
	public String getLikeEmailWithStart() {
		return this.likeEmailWithStart;
	}
	public void setLikeEmailWithStart(String email) {	
		setEmail(email);
		setLikeEmail(MatchMode.START);
	}
	public String getLikeEmailWithEnd() {
		return this.likeEmailWithEnd;
	}
	public void setLikeEmailWithEnd(String email) {	
		setEmail(email);
		setLikeEmail(MatchMode.END);
	}
	public String getLikeEmailWithExact() {
		return this.likeEmailWithExact;
	}
	public void setLikeEmailWithExact(String email) {	
		setEmail(email);
		setLikeEmail(MatchMode.EXACT);
	}
	public String getLikeEmailWithAnywhere() {
		return this.likeEmailWithAnywhere;
	}
	public void setLikeEmailWithAnywhere(String email) {	
		setEmail(email);
		setLikeEmail(MatchMode.ANYWHERE);
	}
	private void setLikeEmail(MatchMode matchMode) {		
		this.likeemail = matchMode;
	}
	public java.lang.String getEmail() {
		return this.email;
	}
	
	public void setEmail(java.lang.String value) {		
		this.email = value;
		this.isEmail = true;
	}
	public boolean hasEmail() {
		return this.isEmail;
	}
	public java.lang.String getNotEqEmail() {
		return this.notEqEmail;
	}
	public void setNotEqEmail(java.lang.String email) {
		this.notEqEmail = email;
		this.isNotEqEmail = true;
	}
	public boolean hasNotEqEmail() {
		return this.isNotEqEmail;
	}
	// IN or notIN
	private List<java.lang.String>	inCriterionEmail;
	private List<java.lang.String>	notInCriterionEmail;
	public void setInEmail(boolean isIn,List<java.lang.String> emails){
		if(isIn){
			inCriterionEmail = emails;
		}else{
			notInCriterionEmail = emails;
		}
	}
	public List<java.lang.String> getInEmail() {
		return inCriterionEmail;
	}
	public List<java.lang.String> getNotInEmail() {
		return notInCriterionEmail;
	}
	
	//Null or NotNull
	private Boolean nullCriterionEmail;
	public void setNullEmail(boolean isNull){
			nullCriterionEmail = isNull;
	}
	public Boolean getNullEmail(){
		return nullCriterionEmail;
	} 
	
	private java.lang.Integer ltCriterionState;
	public void setLtState(java.lang.Integer state){
		ltCriterionState = state;
	}
	public java.lang.Integer getLtState(){
		return ltCriterionState;
	}
	private java.lang.Integer leCriterionState;
	public void setLeState(java.lang.Integer state){
		leCriterionState = state;
	}
	public java.lang.Integer getLeState(){
		return leCriterionState;
	}
	private java.lang.Integer gtCriterionState;
	public void setGtState(java.lang.Integer state){
		gtCriterionState = state;
	}
	public java.lang.Integer getGtState(){
		return gtCriterionState;
	}
	private java.lang.Integer geCriterionState;
	public void setGeState(java.lang.Integer state){
		geCriterionState = state;
	}
	public java.lang.Integer getGeState(){
		return geCriterionState;
	}
	public java.lang.Integer getState() {
		return this.state;
	}
	
	public void setState(java.lang.Integer value) {		
		this.state = value;
		this.isState = true;
	}
	public boolean hasState() {
		return this.isState;
	}
	public java.lang.Integer getNotEqState() {
		return this.notEqState;
	}
	public void setNotEqState(java.lang.Integer state) {
		this.notEqState = state;
		this.isNotEqState = true;
	}
	public boolean hasNotEqState() {
		return this.isNotEqState;
	}
	// IN or notIN
	private List<java.lang.Integer>	inCriterionState;
	private List<java.lang.Integer>	notInCriterionState;
	public void setInState(boolean isIn,List<java.lang.Integer> states){
		if(isIn){
			inCriterionState = states;
		}else{
			notInCriterionState = states;
		}
	}
	public List<java.lang.Integer> getInState() {
		return inCriterionState;
	}
	public List<java.lang.Integer> getNotInState() {
		return notInCriterionState;
	}
	
	//Null or NotNull
	private Boolean nullCriterionState;
	public void setNullState(boolean isNull){
			nullCriterionState = isNull;
	}
	public Boolean getNullState(){
		return nullCriterionState;
	} 
	
	public MatchMode getLikePayType() {
		return this.likepayType;
	}
	public String getLikePayTypeWithStart() {
		return this.likePayTypeWithStart;
	}
	public void setLikePayTypeWithStart(String payType) {	
		setPayType(payType);
		setLikePayType(MatchMode.START);
	}
	public String getLikePayTypeWithEnd() {
		return this.likePayTypeWithEnd;
	}
	public void setLikePayTypeWithEnd(String payType) {	
		setPayType(payType);
		setLikePayType(MatchMode.END);
	}
	public String getLikePayTypeWithExact() {
		return this.likePayTypeWithExact;
	}
	public void setLikePayTypeWithExact(String payType) {	
		setPayType(payType);
		setLikePayType(MatchMode.EXACT);
	}
	public String getLikePayTypeWithAnywhere() {
		return this.likePayTypeWithAnywhere;
	}
	public void setLikePayTypeWithAnywhere(String payType) {	
		setPayType(payType);
		setLikePayType(MatchMode.ANYWHERE);
	}
	private void setLikePayType(MatchMode matchMode) {		
		this.likepayType = matchMode;
	}
	public java.lang.String getPayType() {
		return this.payType;
	}
	
	public void setPayType(java.lang.String value) {		
		this.payType = value;
		this.isPayType = true;
	}
	public boolean hasPayType() {
		return this.isPayType;
	}
	public java.lang.String getNotEqPayType() {
		return this.notEqPayType;
	}
	public void setNotEqPayType(java.lang.String payType) {
		this.notEqPayType = payType;
		this.isNotEqPayType = true;
	}
	public boolean hasNotEqPayType() {
		return this.isNotEqPayType;
	}
	// IN or notIN
	private List<java.lang.String>	inCriterionPayType;
	private List<java.lang.String>	notInCriterionPayType;
	public void setInPayType(boolean isIn,List<java.lang.String> payTypes){
		if(isIn){
			inCriterionPayType = payTypes;
		}else{
			notInCriterionPayType = payTypes;
		}
	}
	public List<java.lang.String> getInPayType() {
		return inCriterionPayType;
	}
	public List<java.lang.String> getNotInPayType() {
		return notInCriterionPayType;
	}
	
	//Null or NotNull
	private Boolean nullCriterionPayType;
	public void setNullPayType(boolean isNull){
			nullCriterionPayType = isNull;
	}
	public Boolean getNullPayType(){
		return nullCriterionPayType;
	} 
	
	public java.time.LocalDateTime getCreateTimeBegin() {
		return this.createTimeBegin;
	}
	
	public void setCreateTimeBegin(java.time.LocalDateTime value) {
		this.createTimeBegin = value;
		this.isCreateTimeBegin = true;
	}	
	
	public java.time.LocalDateTime getCreateTimeEnd() {
		return this.createTimeEnd;
	}
	
	public void setCreateTimeEnd(java.time.LocalDateTime value) {
		this.createTimeEnd = value;
		this.isCreateTimeEnd = true;
	}
	public boolean hasCreateTimeBegin() {
		return this.isCreateTimeBegin;
	}
	public boolean hasCreateTimeEnd() {
		return this.isCreateTimeEnd;
	}	
	public java.time.LocalDateTime getCreateTime() {
		return this.createTime;
	}
	
	public void setCreateTime(java.time.LocalDateTime value) {		
		this.createTime = value;
		this.isCreateTime = true;
	}
	public boolean hasCreateTime() {
		return this.isCreateTime;
	}
	public java.time.LocalDateTime getNotEqCreateTime() {
		return this.notEqCreateTime;
	}
	public void setNotEqCreateTime(java.time.LocalDateTime createTime) {
		this.notEqCreateTime = createTime;
		this.isNotEqCreateTime = true;
	}
	public boolean hasNotEqCreateTime() {
		return this.isNotEqCreateTime;
	}
	// IN or notIN
	private List<java.time.LocalDateTime>	inCriterionCreateTime;
	private List<java.time.LocalDateTime>	notInCriterionCreateTime;
	public void setInCreateTime(boolean isIn,List<java.time.LocalDateTime> createTimes){
		if(isIn){
			inCriterionCreateTime = createTimes;
		}else{
			notInCriterionCreateTime = createTimes;
		}
	}
	public List<java.time.LocalDateTime> getInCreateTime() {
		return inCriterionCreateTime;
	}
	public List<java.time.LocalDateTime> getNotInCreateTime() {
		return notInCriterionCreateTime;
	}
	
	//Null or NotNull
	private Boolean nullCriterionCreateTime;
	public void setNullCreateTime(boolean isNull){
			nullCriterionCreateTime = isNull;
	}
	public Boolean getNullCreateTime(){
		return nullCriterionCreateTime;
	} 
	
	public java.time.LocalDateTime getUpdateTimeBegin() {
		return this.updateTimeBegin;
	}
	
	public void setUpdateTimeBegin(java.time.LocalDateTime value) {
		this.updateTimeBegin = value;
		this.isUpdateTimeBegin = true;
	}	
	
	public java.time.LocalDateTime getUpdateTimeEnd() {
		return this.updateTimeEnd;
	}
	
	public void setUpdateTimeEnd(java.time.LocalDateTime value) {
		this.updateTimeEnd = value;
		this.isUpdateTimeEnd = true;
	}
	public boolean hasUpdateTimeBegin() {
		return this.isUpdateTimeBegin;
	}
	public boolean hasUpdateTimeEnd() {
		return this.isUpdateTimeEnd;
	}	
	public java.time.LocalDateTime getUpdateTime() {
		return this.updateTime;
	}
	
	public void setUpdateTime(java.time.LocalDateTime value) {		
		this.updateTime = value;
		this.isUpdateTime = true;
	}
	public boolean hasUpdateTime() {
		return this.isUpdateTime;
	}
	public java.time.LocalDateTime getNotEqUpdateTime() {
		return this.notEqUpdateTime;
	}
	public void setNotEqUpdateTime(java.time.LocalDateTime updateTime) {
		this.notEqUpdateTime = updateTime;
		this.isNotEqUpdateTime = true;
	}
	public boolean hasNotEqUpdateTime() {
		return this.isNotEqUpdateTime;
	}
	// IN or notIN
	private List<java.time.LocalDateTime>	inCriterionUpdateTime;
	private List<java.time.LocalDateTime>	notInCriterionUpdateTime;
	public void setInUpdateTime(boolean isIn,List<java.time.LocalDateTime> updateTimes){
		if(isIn){
			inCriterionUpdateTime = updateTimes;
		}else{
			notInCriterionUpdateTime = updateTimes;
		}
	}
	public List<java.time.LocalDateTime> getInUpdateTime() {
		return inCriterionUpdateTime;
	}
	public List<java.time.LocalDateTime> getNotInUpdateTime() {
		return notInCriterionUpdateTime;
	}
	
	//Null or NotNull
	private Boolean nullCriterionUpdateTime;
	public void setNullUpdateTime(boolean isNull){
			nullCriterionUpdateTime = isNull;
	}
	public Boolean getNullUpdateTime(){
		return nullCriterionUpdateTime;
	} 
	
	public MatchMode getLikeTestEmail() {
		return this.liketestEmail;
	}
	public String getLikeTestEmailWithStart() {
		return this.likeTestEmailWithStart;
	}
	public void setLikeTestEmailWithStart(String testEmail) {	
		setTestEmail(testEmail);
		setLikeTestEmail(MatchMode.START);
	}
	public String getLikeTestEmailWithEnd() {
		return this.likeTestEmailWithEnd;
	}
	public void setLikeTestEmailWithEnd(String testEmail) {	
		setTestEmail(testEmail);
		setLikeTestEmail(MatchMode.END);
	}
	public String getLikeTestEmailWithExact() {
		return this.likeTestEmailWithExact;
	}
	public void setLikeTestEmailWithExact(String testEmail) {	
		setTestEmail(testEmail);
		setLikeTestEmail(MatchMode.EXACT);
	}
	public String getLikeTestEmailWithAnywhere() {
		return this.likeTestEmailWithAnywhere;
	}
	public void setLikeTestEmailWithAnywhere(String testEmail) {	
		setTestEmail(testEmail);
		setLikeTestEmail(MatchMode.ANYWHERE);
	}
	private void setLikeTestEmail(MatchMode matchMode) {		
		this.liketestEmail = matchMode;
	}
	public java.lang.String getTestEmail() {
		return this.testEmail;
	}
	
	public void setTestEmail(java.lang.String value) {		
		this.testEmail = value;
		this.isTestEmail = true;
	}
	public boolean hasTestEmail() {
		return this.isTestEmail;
	}
	public java.lang.String getNotEqTestEmail() {
		return this.notEqTestEmail;
	}
	public void setNotEqTestEmail(java.lang.String testEmail) {
		this.notEqTestEmail = testEmail;
		this.isNotEqTestEmail = true;
	}
	public boolean hasNotEqTestEmail() {
		return this.isNotEqTestEmail;
	}
	// IN or notIN
	private List<java.lang.String>	inCriterionTestEmail;
	private List<java.lang.String>	notInCriterionTestEmail;
	public void setInTestEmail(boolean isIn,List<java.lang.String> testEmails){
		if(isIn){
			inCriterionTestEmail = testEmails;
		}else{
			notInCriterionTestEmail = testEmails;
		}
	}
	public List<java.lang.String> getInTestEmail() {
		return inCriterionTestEmail;
	}
	public List<java.lang.String> getNotInTestEmail() {
		return notInCriterionTestEmail;
	}
	
	//Null or NotNull
	private Boolean nullCriterionTestEmail;
	public void setNullTestEmail(boolean isNull){
			nullCriterionTestEmail = isNull;
	}
	public Boolean getNullTestEmail(){
		return nullCriterionTestEmail;
	} 
	
	public MatchMode getLikeUsername() {
		return this.likeusername;
	}
	public String getLikeUsernameWithStart() {
		return this.likeUsernameWithStart;
	}
	public void setLikeUsernameWithStart(String username) {	
		setUsername(username);
		setLikeUsername(MatchMode.START);
	}
	public String getLikeUsernameWithEnd() {
		return this.likeUsernameWithEnd;
	}
	public void setLikeUsernameWithEnd(String username) {	
		setUsername(username);
		setLikeUsername(MatchMode.END);
	}
	public String getLikeUsernameWithExact() {
		return this.likeUsernameWithExact;
	}
	public void setLikeUsernameWithExact(String username) {	
		setUsername(username);
		setLikeUsername(MatchMode.EXACT);
	}
	public String getLikeUsernameWithAnywhere() {
		return this.likeUsernameWithAnywhere;
	}
	public void setLikeUsernameWithAnywhere(String username) {	
		setUsername(username);
		setLikeUsername(MatchMode.ANYWHERE);
	}
	private void setLikeUsername(MatchMode matchMode) {		
		this.likeusername = matchMode;
	}
	public java.lang.String getUsername() {
		return this.username;
	}
	
	public void setUsername(java.lang.String value) {		
		this.username = value;
		this.isUsername = true;
	}
	public boolean hasUsername() {
		return this.isUsername;
	}
	public java.lang.String getNotEqUsername() {
		return this.notEqUsername;
	}
	public void setNotEqUsername(java.lang.String username) {
		this.notEqUsername = username;
		this.isNotEqUsername = true;
	}
	public boolean hasNotEqUsername() {
		return this.isNotEqUsername;
	}
	// IN or notIN
	private List<java.lang.String>	inCriterionUsername;
	private List<java.lang.String>	notInCriterionUsername;
	public void setInUsername(boolean isIn,List<java.lang.String> usernames){
		if(isIn){
			inCriterionUsername = usernames;
		}else{
			notInCriterionUsername = usernames;
		}
	}
	public List<java.lang.String> getInUsername() {
		return inCriterionUsername;
	}
	public List<java.lang.String> getNotInUsername() {
		return notInCriterionUsername;
	}
	
	//Null or NotNull
	private Boolean nullCriterionUsername;
	public void setNullUsername(boolean isNull){
			nullCriterionUsername = isNull;
	}
	public Boolean getNullUsername(){
		return nullCriterionUsername;
	} 
	
	private List<String> listOrderAsc = new ArrayList<>();
	private List<String> listOrderDesc = new ArrayList<>();

	public void setOrderAsc(String fdName) {
		listOrderAsc.add(fdName);
	}

	public void setOrderDec(String fdName) {
		listOrderDesc.add(fdName);
	}

	public List<String> getOrderAscList() {
		return listOrderAsc;
	}

	public List<String> getOrderDecList() {
		return listOrderDesc;
	}
	
	
	/**
	 * 获取查询条件
	 */
	public Specification<Pay> createSpecification() {
		Specification<Pay> example = (root, query, criteriaBuilder) -> {
			List<Order> orders = new ArrayList<>();
			for (String asc : this.getOrderAscList()) {
				orders.add(criteriaBuilder.asc(root.get(asc)));
			}
			for (String desc : this.getOrderDecList()) {
				orders.add(criteriaBuilder.desc(root.get(desc)));
			}
			query.orderBy(orders);
			List<Predicate> predicates = createQuery(root, this, criteriaBuilder);
			hookQuery(root, criteriaBuilder,predicates);
			return query.where(predicates.toArray(new Predicate[predicates.size()])).getRestriction();
		};
		return example;
	}
	/**
	 * <p>
	 * <p>自定义的方法时候实现此方法即可(内部类方式使用即可)
	 * <p>使用方法: predicates.add(criteriaBuilder.equal(root.get("biaoqian").as(String.class), "value"));
	 * @param root
	 * @param query
	 * @param criteriaBuilder
	 * @param predicates
	 */
	public void hookQuery(Root<Pay> root, CriteriaBuilder criteriaBuilder,List<Predicate> predicates) {}
	/**
	 * 组装query对象
	 * 
	 * @param root
	 * @param PayQuery
	 * @param criteriaBuilder
	 * @return
	 */
	private List<Predicate> createQuery(Root<Pay> root, PayQuery query, CriteriaBuilder criteriaBuilder) {
		List<Predicate> predicates = new ArrayList<Predicate>();
		/**
		 * idExpression
		 */
		Expression<java.lang.Integer> idExpression = root.get(Pay.PROP_ID).as(java.lang.Integer.class);
		if (query.hasId()) {
			java.lang.Integer value = query.getId();
			if( value != null){
				predicates.add(criteriaBuilder.equal(idExpression, value));					
			}
		}
		if (query.hasNotEqId()) {
			java.lang.Integer value = query.getNotEqId();
			predicates.add(criteriaBuilder.notEqual(idExpression, value));
		}
		
		if(query.getLeId()!=null){
			predicates.add(criteriaBuilder.le(idExpression, query.getLeId()));
		}
		if(query.getGeId()!=null){
			predicates.add(criteriaBuilder.ge(idExpression, query.getGeId()));
		}
		if(query.getLtId()!=null){
			predicates.add(criteriaBuilder.lt(idExpression, query.getLtId()));
		}
		if(query.getGtId()!=null){
			predicates.add(criteriaBuilder.gt(idExpression, query.getGtId()));
		}
		
		if (query.getInId() != null) {
			predicates.add(idExpression.in(query.getInId()));
		}
		if (query.getNotInId() != null) {
			predicates.add(criteriaBuilder.not(idExpression.in(query.getInId())));
		}
		if (query.getNullId() != null) {
			if (query.getNullId()) {
				predicates.add(criteriaBuilder.isNull(idExpression));
			} else {
				predicates.add(criteriaBuilder.isNotNull(idExpression));
			}
		}
		/**
		 * nickNameExpression
		 */
		Expression<java.lang.String> nickNameExpression = root.get(Pay.PROP_NICK_NAME).as(java.lang.String.class);
		if (query.hasNickName()) {
			java.lang.String value = query.getNickName();
			if (query.getLikeNickName() != null) {
				predicates.add(criteriaBuilder.like(nickNameExpression, query.getLikeNickName().toMatchString(value)));
			} else {
				predicates.add(criteriaBuilder.equal(nickNameExpression, value));
			}
		}
		if (query.hasNotEqNickName()) {
			java.lang.String value = query.getNotEqNickName();
			predicates.add(criteriaBuilder.notEqual(nickNameExpression, value));
		}
		
		if (query.getInNickName() != null) {
			predicates.add(nickNameExpression.in(query.getInNickName()));
		}
		if (query.getNotInNickName() != null) {
			predicates.add(criteriaBuilder.not(nickNameExpression.in(query.getInNickName())));
		}
		if (query.getNullNickName() != null) {
			if (query.getNullNickName()) {
				predicates.add(criteriaBuilder.isNull(nickNameExpression));
			} else {
				predicates.add(criteriaBuilder.isNotNull(nickNameExpression));
			}
		}
		/**
		 * infoExpression
		 */
		Expression<java.lang.String> infoExpression = root.get(Pay.PROP_INFO).as(java.lang.String.class);
		if (query.hasInfo()) {
			java.lang.String value = query.getInfo();
			if (query.getLikeInfo() != null) {
				predicates.add(criteriaBuilder.like(infoExpression, query.getLikeInfo().toMatchString(value)));
			} else {
				predicates.add(criteriaBuilder.equal(infoExpression, value));
			}
		}
		if (query.hasNotEqInfo()) {
			java.lang.String value = query.getNotEqInfo();
			predicates.add(criteriaBuilder.notEqual(infoExpression, value));
		}
		
		if (query.getInInfo() != null) {
			predicates.add(infoExpression.in(query.getInInfo()));
		}
		if (query.getNotInInfo() != null) {
			predicates.add(criteriaBuilder.not(infoExpression.in(query.getInInfo())));
		}
		if (query.getNullInfo() != null) {
			if (query.getNullInfo()) {
				predicates.add(criteriaBuilder.isNull(infoExpression));
			} else {
				predicates.add(criteriaBuilder.isNotNull(infoExpression));
			}
		}
		/**
		 * moneyExpression
		 */
		Expression<Long> moneyExpression = root.get(Pay.PROP_MONEY).as(Long.class);
		if (query.hasMoney()) {
			Long value = query.getMoney();
			if( value != null){
				predicates.add(criteriaBuilder.equal(moneyExpression, value));					
			}
		}
		if (query.hasNotEqMoney()) {
			Long value = query.getNotEqMoney();
			predicates.add(criteriaBuilder.notEqual(moneyExpression, value));
		}
		
		if (query.getInMoney() != null) {
			predicates.add(moneyExpression.in(query.getInMoney()));
		}
		if (query.getNotInMoney() != null) {
			predicates.add(criteriaBuilder.not(moneyExpression.in(query.getInMoney())));
		}
		if (query.getNullMoney() != null) {
			if (query.getNullMoney()) {
				predicates.add(criteriaBuilder.isNull(moneyExpression));
			} else {
				predicates.add(criteriaBuilder.isNotNull(moneyExpression));
			}
		}
		/**
		 * emailExpression
		 */
		Expression<java.lang.String> emailExpression = root.get(Pay.PROP_EMAIL).as(java.lang.String.class);
		if (query.hasEmail()) {
			java.lang.String value = query.getEmail();
			if (query.getLikeEmail() != null) {
				predicates.add(criteriaBuilder.like(emailExpression, query.getLikeEmail().toMatchString(value)));
			} else {
				predicates.add(criteriaBuilder.equal(emailExpression, value));
			}
		}
		if (query.hasNotEqEmail()) {
			java.lang.String value = query.getNotEqEmail();
			predicates.add(criteriaBuilder.notEqual(emailExpression, value));
		}
		
		if (query.getInEmail() != null) {
			predicates.add(emailExpression.in(query.getInEmail()));
		}
		if (query.getNotInEmail() != null) {
			predicates.add(criteriaBuilder.not(emailExpression.in(query.getInEmail())));
		}
		if (query.getNullEmail() != null) {
			if (query.getNullEmail()) {
				predicates.add(criteriaBuilder.isNull(emailExpression));
			} else {
				predicates.add(criteriaBuilder.isNotNull(emailExpression));
			}
		}
		/**
		 * stateExpression
		 */
		Expression<java.lang.Integer> stateExpression = root.get(Pay.PROP_STATE).as(java.lang.Integer.class);
		if (query.hasState()) {
			java.lang.Integer value = query.getState();
			if( value != null){
				predicates.add(criteriaBuilder.equal(stateExpression, value));					
			}
		}
		if (query.hasNotEqState()) {
			java.lang.Integer value = query.getNotEqState();
			predicates.add(criteriaBuilder.notEqual(stateExpression, value));
		}
		
		if(query.getLeState()!=null){
			predicates.add(criteriaBuilder.le(stateExpression, query.getLeState()));
		}
		if(query.getGeState()!=null){
			predicates.add(criteriaBuilder.ge(stateExpression, query.getGeState()));
		}
		if(query.getLtState()!=null){
			predicates.add(criteriaBuilder.lt(stateExpression, query.getLtState()));
		}
		if(query.getGtState()!=null){
			predicates.add(criteriaBuilder.gt(stateExpression, query.getGtState()));
		}
		
		if (query.getInState() != null) {
			predicates.add(stateExpression.in(query.getInState()));
		}
		if (query.getNotInState() != null) {
			predicates.add(criteriaBuilder.not(stateExpression.in(query.getInState())));
		}
		if (query.getNullState() != null) {
			if (query.getNullState()) {
				predicates.add(criteriaBuilder.isNull(stateExpression));
			} else {
				predicates.add(criteriaBuilder.isNotNull(stateExpression));
			}
		}
		/**
		 * payTypeExpression
		 */
		Expression<java.lang.String> payTypeExpression = root.get(Pay.PROP_PAY_TYPE).as(java.lang.String.class);
		if (query.hasPayType()) {
			java.lang.String value = query.getPayType();
			if (query.getLikePayType() != null) {
				predicates.add(criteriaBuilder.like(payTypeExpression, query.getLikePayType().toMatchString(value)));
			} else {
				predicates.add(criteriaBuilder.equal(payTypeExpression, value));
			}
		}
		if (query.hasNotEqPayType()) {
			java.lang.String value = query.getNotEqPayType();
			predicates.add(criteriaBuilder.notEqual(payTypeExpression, value));
		}
		
		if (query.getInPayType() != null) {
			predicates.add(payTypeExpression.in(query.getInPayType()));
		}
		if (query.getNotInPayType() != null) {
			predicates.add(criteriaBuilder.not(payTypeExpression.in(query.getInPayType())));
		}
		if (query.getNullPayType() != null) {
			if (query.getNullPayType()) {
				predicates.add(criteriaBuilder.isNull(payTypeExpression));
			} else {
				predicates.add(criteriaBuilder.isNotNull(payTypeExpression));
			}
		}
		/**
		 * createTimeExpression
		 */
		Expression<java.time.LocalDateTime> createTimeExpression = root.get(Pay.PROP_CREATE_TIME).as(java.time.LocalDateTime.class);
		if(query.hasCreateTimeBegin() && query.getCreateTimeBegin()!= null){
			if(!query.hasCreateTimeEnd() || query.getCreateTimeEnd() == null){
				predicates.add(criteriaBuilder.greaterThan(createTimeExpression, query.getCreateTimeBegin()));
			}else{
				predicates.add(criteriaBuilder.between(createTimeExpression, query.getCreateTimeBegin(), query.getCreateTimeEnd()));
			}			
		}
		if(query.hasCreateTimeEnd() && query.getCreateTimeEnd()!=null){
			if(!query.hasCreateTimeBegin() || query.getCreateTimeBegin() == null){
				predicates.add(criteriaBuilder.lessThan(createTimeExpression, query.getCreateTimeBegin()));
			}
		}							
		if (query.hasCreateTime()) {
			java.time.LocalDateTime value = query.getCreateTime();
			if( value != null){
				predicates.add(criteriaBuilder.equal(createTimeExpression, value));					
			}
		}
		if (query.hasNotEqCreateTime()) {
			java.time.LocalDateTime value = query.getNotEqCreateTime();
			predicates.add(criteriaBuilder.notEqual(createTimeExpression, value));
		}
		
		if (query.getInCreateTime() != null) {
			predicates.add(createTimeExpression.in(query.getInCreateTime()));
		}
		if (query.getNotInCreateTime() != null) {
			predicates.add(criteriaBuilder.not(createTimeExpression.in(query.getInCreateTime())));
		}
		if (query.getNullCreateTime() != null) {
			if (query.getNullCreateTime()) {
				predicates.add(criteriaBuilder.isNull(createTimeExpression));
			} else {
				predicates.add(criteriaBuilder.isNotNull(createTimeExpression));
			}
		}
		/**
		 * updateTimeExpression
		 */
		Expression<java.time.LocalDateTime> updateTimeExpression = root.get(Pay.PROP_UPDATE_TIME).as(java.time.LocalDateTime.class);
		if(query.hasUpdateTimeBegin() && query.getUpdateTimeBegin()!= null){
			if(!query.hasUpdateTimeEnd() || query.getUpdateTimeEnd() == null){
				predicates.add(criteriaBuilder.greaterThan(updateTimeExpression, query.getUpdateTimeBegin()));
			}else{
				predicates.add(criteriaBuilder.between(updateTimeExpression, query.getUpdateTimeBegin(), query.getUpdateTimeEnd()));
			}			
		}
		if(query.hasUpdateTimeEnd() && query.getUpdateTimeEnd()!=null){
			if(!query.hasUpdateTimeBegin() || query.getUpdateTimeBegin() == null){
				predicates.add(criteriaBuilder.lessThan(updateTimeExpression, query.getUpdateTimeBegin()));
			}
		}							
		if (query.hasUpdateTime()) {
			java.time.LocalDateTime value = query.getUpdateTime();
			if( value != null){
				predicates.add(criteriaBuilder.equal(updateTimeExpression, value));					
			}
		}
		if (query.hasNotEqUpdateTime()) {
			java.time.LocalDateTime value = query.getNotEqUpdateTime();
			predicates.add(criteriaBuilder.notEqual(updateTimeExpression, value));
		}
		
		if (query.getInUpdateTime() != null) {
			predicates.add(updateTimeExpression.in(query.getInUpdateTime()));
		}
		if (query.getNotInUpdateTime() != null) {
			predicates.add(criteriaBuilder.not(updateTimeExpression.in(query.getInUpdateTime())));
		}
		if (query.getNullUpdateTime() != null) {
			if (query.getNullUpdateTime()) {
				predicates.add(criteriaBuilder.isNull(updateTimeExpression));
			} else {
				predicates.add(criteriaBuilder.isNotNull(updateTimeExpression));
			}
		}
		/**
		 * testEmailExpression
		 */
		Expression<java.lang.String> testEmailExpression = root.get(Pay.PROP_TEST_EMAIL).as(java.lang.String.class);
		if (query.hasTestEmail()) {
			java.lang.String value = query.getTestEmail();
			if (query.getLikeTestEmail() != null) {
				predicates.add(criteriaBuilder.like(testEmailExpression, query.getLikeTestEmail().toMatchString(value)));
			} else {
				predicates.add(criteriaBuilder.equal(testEmailExpression, value));
			}
		}
		if (query.hasNotEqTestEmail()) {
			java.lang.String value = query.getNotEqTestEmail();
			predicates.add(criteriaBuilder.notEqual(testEmailExpression, value));
		}
		
		if (query.getInTestEmail() != null) {
			predicates.add(testEmailExpression.in(query.getInTestEmail()));
		}
		if (query.getNotInTestEmail() != null) {
			predicates.add(criteriaBuilder.not(testEmailExpression.in(query.getInTestEmail())));
		}
		if (query.getNullTestEmail() != null) {
			if (query.getNullTestEmail()) {
				predicates.add(criteriaBuilder.isNull(testEmailExpression));
			} else {
				predicates.add(criteriaBuilder.isNotNull(testEmailExpression));
			}
		}
		/**
		 * usernameExpression
		 */
		Expression<java.lang.String> usernameExpression = root.get(Pay.PROP_USERNAME).as(java.lang.String.class);
		if (query.hasUsername()) {
			java.lang.String value = query.getUsername();
			if (query.getLikeUsername() != null) {
				predicates.add(criteriaBuilder.like(usernameExpression, query.getLikeUsername().toMatchString(value)));
			} else {
				predicates.add(criteriaBuilder.equal(usernameExpression, value));
			}
		}
		if (query.hasNotEqUsername()) {
			java.lang.String value = query.getNotEqUsername();
			predicates.add(criteriaBuilder.notEqual(usernameExpression, value));
		}
		
		if (query.getInUsername() != null) {
			predicates.add(usernameExpression.in(query.getInUsername()));
		}
		if (query.getNotInUsername() != null) {
			predicates.add(criteriaBuilder.not(usernameExpression.in(query.getInUsername())));
		}
		if (query.getNullUsername() != null) {
			if (query.getNullUsername()) {
				predicates.add(criteriaBuilder.isNull(usernameExpression));
			} else {
				predicates.add(criteriaBuilder.isNotNull(usernameExpression));
			}
		}
		return predicates;
	}
	public String toString() {
		return ToStringBuilder.reflectionToString(this,ToStringStyle.MULTI_LINE_STYLE);
	}
	
}

